package com.StarStudio.Service;

import com.ruoyi.common.core.Entity.Goods;
import com.ruoyi.common.core.Entity.GoodsResult;
import com.ruoyi.common.core.Entity.PanicBuyingGoods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "Goods")
public interface GoodsService {

    @RequestMapping("/findByGoodsId/{goodsId}")
    Goods findByGoods_id(@PathVariable(value = "goodsId") long goodsId);

    @PutMapping("/put")
    void updateGoods(@RequestBody Goods goods);

    @RequestMapping("/findStockByGoodsId/{goodsId}")
    int findStockByGoodsId(@PathVariable(value = "goodsId") long goodsId);

    @RequestMapping("/updateGoodsStockById/{goodsId}/{stock}")
    void updateGoodsStockById(@PathVariable(value = "goodsId") long goodsId,@PathVariable(value = "stock") int stock);

}
